RWTH - Mindstorms NXT Toolbox

SendMotorSettings

Sends previously specified settings to current active motor.

Contents

Syntax

SendMotorSettings()

SendMotorSettings(port, power, angle, speedRegulation, syncedToMotor, turnRatio, rampMode)

Description

SendMotorSettings() sends the previously specified settings of the current motor. The motor settings are set by the functions SetMotor, SetPower, SetAngleLimit, SpeedRegulation, SyncToMotor, SetTurnRatio and SetRampMode.

SendMotorSettings(port, power, angle, speedRegulation, syncedToMotor, turnRatio, rampMode) sends the given settings like motor port (MOTOR_A, MOTOR_B or MOTOR_C), the power (-100...100, the angle limit, speedRegulation ('on', 'off'), syncedToMotor (MOTOR_A, MOTOR_B, MOTOR_C), turnRatio (-100...100) and rampMode ('off', 'up', 'down').

Note:

All settings like power, angle limit and so on, will only take effect once you send them to the motor using THIS function. Note that if you have synced two motors together, this function internally sends two packets to both the motors. This is required, but you can work as if this was just one command.

Example

   SetMotor(MOTOR_B);
   	SyncToMotor(MOTOR_C);
   	SetPower(76);
   	SetAngleLimit(4*360);
   	SetTurnRatio(20);
   SendMotorSettings();

See also

MOTOR_B, MOTOR_C

Signature